# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=aparte
pkgver=0.2.0_git20240515
_gitrev=40e6e89aeffff05b7626382c33e72fc05788ffbc
pkgrel=0
pkgdesc="Simple XMPP console client written in Rust"
url="https://github.com/paulfariello/aparte"
arch="all"
license="MPL-2.0"
makedepends="
	cargo
	cargo-auditable
	protoc
	sqlite-dev
	"
source="https://github.com/paulfariello/aparte/archive/$_gitrev/aparte-$_gitrev.tar.gz
	cargo-lock-update-xmpp-rs.patch
	update-libc-crate.patch
	"
builddir="$srcdir/$pkgname-$_gitrev"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dvm755 target/release/aparte \
		-t "$pkgdir"/usr/bin/
}

sha512sums="
a43a91c18698d5082742ce2ce4db50ee11cf27b6e0e9431cd07c91526e4bb5bb1dc1eba171efd9eeca04e1cf58b1be143157bcec3471d01a8a95d48efb850760  aparte-40e6e89aeffff05b7626382c33e72fc05788ffbc.tar.gz
fafe7bc881c730c33358678c02a7a18570eae7626afb5d6ec3f4929d5f6c27f86fec22a5bc4e1aa75d5d27e3e03dae0b319bbc04942ca837da21b8e6a0d0d93a  cargo-lock-update-xmpp-rs.patch
c3098d2f5294d3dfb0399fe0e506b6f1af489056fabb581d8de96f9cbfcdc771612bd2cdafcd192ef580680eac8d91164dce29397612412ad1592a8546359fc9  update-libc-crate.patch
"
